//
//  ZGSBaseViewController.m
//  Tour
//
//  Created by dllo on 15/11/6.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ZGSBaseViewController.h"
#import "AdvanceEdit.h"
@interface ZGSBaseViewController ()

@end

@implementation ZGSBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.hidesBarsOnSwipe = YES;
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, HEIGHT - self.tabBarController.tabBar.frame.size.height - self.navigationController.navigationBar.frame.size.height  - 2, WIDTH, self.navigationController.navigationBar.frame.size.height)];
    [self.view addSubview:label];
    label.text = @"祝你旅途愉快!";
    label.textAlignment = 1;
    [label release];
       // Do any additional setup after loading the view.
//    [self iswlan];
}
// 状态
- (void)iswlan {
    AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager];
    [manager startMonitoring];
    [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        if (status == 1) {
            UIAlertController *aleryController = [UIAlertController alertControllerWithTitle:@"已连接" message:@"为2g/3g/4g网" preferredStyle:UIAlertControllerStyleAlert];
            [self presentViewController:aleryController animated:YES completion:nil];
            UIAlertAction *leftAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:nil];
//            self.navigationController.hidesBarsOnSwipe = YES;
            [aleryController addAction:leftAction];
            
        }
        else if (status == 2) {
            UIAlertController *aleryController = [UIAlertController alertControllerWithTitle:@"已连接" message:@"为wifi连接" preferredStyle:UIAlertControllerStyleAlert];
            [self presentViewController:aleryController animated:YES completion:nil];
            UIAlertAction *leftAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:nil];
            [aleryController addAction:leftAction];
        }
        else if (status == 0) {
            UIAlertController *aleryController = [UIAlertController alertControllerWithTitle:@"无连接" message:@"没有连接" preferredStyle:UIAlertControllerStyleAlert];
            [self presentViewController:aleryController animated:YES completion:nil];
            UIAlertAction *leftAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:nil];
            [aleryController addAction:leftAction];
            
        }
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
